Repository navigation
Classify rejected provider responses without exposing content - #13
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The inference proxy's format failure currently discards whether an upstream 2xx reply was JSON, HTML, missing a body or mislabeled. Preserve the actual status, a five-value Content-Type category and body presence, plus only existing approved machine codes/parameters from at most 8 KiB of JSON. Never forward raw bodies, header values, messages, prompts, user data or credentials.
Non-SSE success still fails closed; require the exact SSE media type, preserve the fixed Responses endpoint and all credential/OIDC/merge boundaries. Provider metadata is projected only for provider diagnostics and cannot be attested by the unprivileged reviewer. Failed inference still exits nonzero and only permits separate non-approving fallback publication.
Verified against the official SIWC Responses documentation and pinned Codex 0.169.0. A bundled Codex model catalog is not account entitlement; the affected account-specific catalog and precise production response shape remain unverified, with authorized owner-only investigation documented. No specific model/authentication/provider cause is inferred from the historical generic log.
Validation: Node 24 check (143 tests, typecheck, lint, build), independent clean-source check, real workerd/D1, 21 targeted execution/security regressions, Actionlint, Docker build and actual pinned Codex using synthetic SSE success/HTTP 400 JSON/HTTP 200 JSON failures, npm audit, strict image scan and Wrangler dry-run. Failure tests require exit 1, no review output and sanitized metadata. No deployment, OAuth reconnect, real inference or merge performed.
Runner source changes require coordinated exact source/Worker trust/caller pins. Rollout drafts must stay blocked until this PR merges and both pins (including the exact backend test expectation) use the verified actual merged source SHA. Keep merge disabled; verify credential-only diagnostics before a separately authorized fresh advisory test. No database migration, new permissions or secret changes.